<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:shriro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
    <meta charset="utf-8"/>
    <title>米塔云平台管理系统</title>
    <link href="../plugins/bootstrap/bootstrap.min.css" rel="stylesheet"/>
    <link href="../plugins/bootstrapValidator/bootstrapValidator.min.css" rel="stylesheet"/>
    <link href="../plugins/font-awesome/css/all.min.css" rel="stylesheet"/>
    <link href="../customize/css/iconfont.css" rel="stylesheet"/>
    <link href="../customize/css/content.css" rel="stylesheet"/>
    <style>
        .company-list {
            background: #FFFFFF url(../customize/images/bank-internal-list-bg.png) no-repeat right bottom;
            border-radius: 4px;
            box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.3);
            padding: 15px;
        }

        .company-list img {
            width: 66px;
            height: 66px;
            border-radius: 50%;
        }
    </style>
</head>
<body>
<div class="m-3">
    <nav class="custom-section mb-3">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><i class="iconfont icon-xiaolan12"></i> 银行管理</li>
            <li class="breadcrumb-item active"><i class="iconfont icon-xiaolan13"></i> 银行内部管理</li>
        </ol>
    </nav>
    <div class="custom-section mb-3 d-flex align-items-center">
        <img id="bLogo" src="../customize/images/no-picture.png" style="width: 84px; height: 84px;" alt="">
        <div class="ml-3">
            <input type="hidden" id="bId" name="bId">
            <div class="mb-2" id="bName"></div>
            <div class="font-p14">
                <i class="iconfont icon-guanjidingwei" style="color: #146AB8;"></i>
                <span class="text-secondary" id="bAddress"></span>
            </div>
        </div>
        <a shiro:hasPermission="bank:inner:opera" class="font-p14 ml-4" id="btn_bank_info_edit" disabled href="##" onclick="editBankInfo()"><i class="iconfont icon-xiugai"></i> 修改</a>
    </div>
    <div class="custom-section font-p20 mb-3">
        <i class="iconfont icon-anquan"></i> 已授信企业
    </div>
    <div class="row mb-3" id="creditCompany_List"></div>
    <div class="custom-section font-p20 mb-3">
        <i class="iconfont icon-xiaohui9"></i> 用户管理
    </div>
    <div class="custom-section">
        <div class="form-row">
            <div class="col-auto">
                <div shiro:hasAnyPermission="bank:inner:opera,bank:inner:view" class="input-group mb-2">
                    <input type="text" class="form-control" placeholder="快捷查询" id="searchValue">
                    <div class="input-group-append">
                        <button class="btn btn-primary" id="btn_bankStuff" disabled type="button" onclick="loadBankStuff($('#bId').val())"><i
                                class="iconfont icon-dituyechaxun"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <table id="stuffList" class="table table-striped table-bordered table-center"></table>
        <div id="page" class="page_div"></div>
    </div>
</div>
<!-- Modal -->
<div shiro:hasPermission="bank:inner:opera" class="modal fade" id="bankInfoModal" data-backdrop="static" tabindex="-1">
    <div class="modal-dialog modal-dialog-centered">
        <form class="modal-content text-body" id="bankInfoForm">
            <div class="modal-header">
                <div class="modal-title"><i class="iconfont icon-juxing"></i><span id="modal_title1">修改银行信息</span></div>
                <button type="button" class="close" data-dismiss="modal">
                    <span>&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="text-secondary font-p12 mb-2">注：带<span class="form-required">*</span><span class="ml-3"></span>标识的为必填项</div>
                <div class="form-group row">
                    <input type="hidden" name="id" id="id">
                    <label class="col-sm-3 col-form-label" for="name">银行名称<span class="form-required">*</span></label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="name" id="name">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="province">位置<span class="form-required">*</span></label>
                    <div class="col-sm-8 mb-2">
                        <select class="form-control" name="province" id="province"></select>
                    </div>
                    <div class="offset-sm-3 col-sm-8 mb-2">
                        <select class="form-control" name="city" id="city"></select>
                    </div>
                    <div class="offset-sm-3 col-sm-8">
                        <textarea class="form-control" name="address" id="address" rows="3"
                                  placeholder="输入详细位置"></textarea>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label">logo</label>
                    <div class="col-sm-8">
                        <a class="image-upload-area text-center d-flex align-items-center justify-content-center"
                           href="##" onclick="$('#add_file_hide').click()">
                            <img id="img_load_area" src="../customize/images/icon/image-upload.png" alt="">
                        </a>
                        <input type="file" name="logoFile" id="add_file_hide" style="display: none">
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-primary" onclick="">提交保存</button>
            </div>
        </form>
    </div>
</div>
<div shiro:hasPermission="bank:inner:opera" class="modal fade" id="userInfoModal" data-backdrop="static" tabindex="-1">
    <div class="modal-dialog modal-dialog-centered">
        <form class="modal-content text-body" id="userInfoForm">
            <div class="modal-header">
                <div class="modal-title"><i class="iconfont icon-juxing"></i><span id="modal_title">修改用户信息</span></div>
                <button type="button" class="close" data-dismiss="modal">
                    <span>&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="text-secondary font-p12 mb-2">注：带<span class="form-required">*</span><span class="ml-3"></span>标识的为必填项</div>
                <input type="text" id="userId" name="id" hidden>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="displayName">用户名<span class="form-required">*</span></label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="displayName" id="displayName" maxlength="16">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="username">手机号<span class="form-required">*</span></label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" id="username" disabled>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="role">角色<span class="form-required">*</span></label>
                    <div class="col-sm-8">
                        <select class="form-control" name="role" id="role"></select>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="areaDisplayName">权限区域<span class="form-required">*</span></label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="areaDisplayName" id="areaDisplayName">
                        <input class="form-control" type="text" name="area" id="area" hidden>
                        <ul class="list-group" id="listGroup1" style="display: none;"></ul>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="status">访问状态</label>
                    <div class="col-sm-8">
                        <select class="form-control" name="status" id="status">
                            <option value="1">允许</option>
                            <option value="0">禁止</option>
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="expire">有效期</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="expire" id="expire">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="desc">备注</label>
                    <div class="col-sm-8">
                        <textarea class="form-control" name="desc" id="desc" rows="3"></textarea>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" onclick="saveUser();">提交保存</button>
            </div>
        </form>
    </div>
</div>
</body>
<script src="../plugins/jquery-3.4.1.min.js"></script>
<script src="../plugins/bootstrap/bootstrap.bundle.min.js"></script>
<script src="../plugins/bootstrapValidator/bootstrapValidator.min.js"></script>
<script src="../plugins/bootstrapValidator/zh_CN.js"></script>
<script src="../plugins/alert.js"></script>
<script src="../plugins/paging.js"></script>
<script src="../plugins/laydate/laydate.js"></script>
<script src="../customize/js/customModalV2.js"></script>
<script src="../customize/js/common.js"></script>
<script src="../customize/js/CommonUtils.js"></script>
<script src="../customize/js/area.js"></script>
<script src="../customize/js/bankInternalManagement.js"></script>
<script>
    var bankInnerView =false;
    var bankInnerOpera =false;
    var title = ['#', '用户名', '手机号', '角色', '权限区域', '访问状态', '有效期', '备注'];
    var label = ['order', 'displayName', 'username', 'roleName', 'areaDisplay', 'status', 'expire', 'desc'];
</script>
<shriro:hasPermission name="bank:inner:view">
    <script>
         bankInnerView =true;
    </script>
</shriro:hasPermission>

<shiro:hasPermission name="bank:inner:opera">
    <script>
        bankInnerOpera =true;
        title.push('操作');
        label.push('opera');
    </script>
</shiro:hasPermission>

</html>